package com.autumn.dao;

import com.autumn.entities.Payment;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author 123
 */
@Mapper
public interface PaymentDao {

    @Insert("insert into  db2019.payment values (null,#{serial})")
    int create(Payment payment);

    @Select("select * from db2019.payment where id=#{id}")
    Payment getPaymentById(@Param("id") Long id);
}
